<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>欢迎莅临 ZENBOSS白板</title>
<link href="/storage/css/default.css" rel="stylesheet" type="text/css" />
<style>
.login_box{
	float:left;
	border:2px solid #ccc;
	width:165px;
	height:auto;
	padding:20px;
	}
.txt_input{
	width:250px;
	border:1px solid #bbb;
	padding:2px;
	}
</style>
<script type="text/javascript" src="/storage/js/common.js"></script>
<script type="text/javascript" src="/storage/js/mootools.js"></script>
<script type="text/javascript">
function change_v(id){
	var v_obj=document.getElementById(id);
	v_obj.style.backgroundImage="url(/tools.php?do=v&"+Math.random()+")";
//	v_obj.style.paddingLeft="40px";
//	
//	v_obj.style.width='110px';
//alert('ddddeeddd');
}
function show_submit_div(){
	var sd = document.getElementById('submit_div');

	if(sd.style.display=='none'){
		sd.style.display='block';
		
	}else{
		sd.style.display='none';
	}
	
}


function show_topic(topic_id){
	var obj = document.getElementById('div_'+topic_id);
//	alert(parseInt(obj.style.width));
	if(parseInt(obj.style.width)<900 || isNaN(parseInt(obj.style.width))){
		document.getElementById('topic_block_'+topic_id).style.float='none';
		var obj = new Fx.Style('div_'+topic_id,'width',{duration:600});
		obj.start(449,925);
		var obj = new Fx.Style('div_'+topic_id,'height',{duration:1000});
		obj.start(0,925);
	}else{
		var obj = new Fx.Style('div_'+topic_id,'width',{duration:600});
		obj.start(925,449);	
//	var obj = new Fx.Style('div_'+topic_id,'height',{duration:1000});
//	obj.start(925,0);
	document.getElementById('div_'+topic_id).style.height='auto';
	}
}

function hidden_div(id){
	var div = document.getElementById('div_'+id);
	if(div.style.position=='absolute'){
		div.style.position='static ';
		
	}else{
		div.style.position='absolute';
	}
	
}

</script>

</head>
<body>
<div style="position:absolute;width:1000px;height:1000px; background:#CCC; z-index:999; display:none;" >dfdf</div>
<?php include('head.php') ?>
<div id="inner_div" onclick="close_div()" style="z-index:998;filter:alpha(opacity=50); -moz-opacity:0.5; opacity: 0.5; background:#000;position:absolute ;top:0px; left:0px; width:0px; height:0px; display:block;"></div>
<div id="inner_iframe" style="display:none;position:absolute ;z-index:999">
	<iframe style="border:0px;" id="iframe" src="" height="100%" width="100%"></iframe>
</div>

<div class="body">
<?php $i=0; foreach ($__ITEMS['topic_arr'] as $topic):?>

<?php /************* TOPIC框 ***************/ ?>
<div id="topic_block_<?php echo $topic['topic_tid'] ?>" class="<?php echo ($i%2==0?'index_topic_block_left_div':'index_topic_block_right_div') ?>">

		<?php /************* TOPIC内容 ***************/ ?>
        <div id="div_<?php echo $topic['topic_tid'] ?>" class="<?php echo ($topic['topic_top_order']>0?'index_topic_top_div':'index_topic_div') ?>">
        
        <a onclick="show_topic('<?php echo $topic['topic_tid'] ?>');return false;" class="title_a" href="/topic.php?tid=<?php echo $topic['topic_tid']?>"><span class="index_topic_title"><? echo $topic['topic_title']?></span></a>
        
        <?php echo (($date_ymd=date('Y-m-d',$topic['topic_birthday']))==date('Y-m-d')?date('H:i:s',$topic['topic_birthday']):$date_ymd)?>
        
        <HR size="1" />
                <?php if (trim($topic['topic_is_club'])==1) :?>
                
                <img onmouseover="resize_max_topic_img(this)" onmouseout="resize_min_topic_img(this);" onerror="this.src='/storage/img/no_img.jpg'" class="list_inner_img" src="<?php echo htmlspecialchars(tools_pick_Value__($topic['topic_theme_pic'],$topic['club_user_theme_pic'])) ?>" /><br /><br />
                <?php endif;?>
                
                <?php echo nl2br(htmlspecialchars(mb_substr($topic['topic_body'],0,100,PAGE_CHAR_SET)))?>
                <span style="color:#555555;"> - <u><?php echo strtr($topic['topic_email'],'@','#') ?></u></span>
                <?php echo $topic['tag_text']?'<br /><span style="color:#888888;">tag:'.$topic['tag_text'].'</span>':''?>
    
        </div>
</div>
<?php $i++; endforeach; ?>








	<table cellspacing="0" border="0" width="100%">
		<tr><td width="75%" valign="top">
			<table cellpadding="0" cellspacing="2" border="0" width="100%"><!-- 左边 -->
			<?php
//			echo $__ITEMS['topic_list'];
			?>
<?php /****************** 打印文章 ********************/ ?>			
			<?php foreach ($__ITEMS['topic_arr'] as $topic):
			
				$color = ( $topic['topic_top_order']>0?"#f00":"#888" );
				$color = ( time() - $topic['topic_birthday'] < 3600*24 ? "#44f" : $color); //判断是否是新文章(24小时内)
			?>
				<tr bgcolor="#dddddd">
					<td style="margin:2px;padding:8px;border-left:5px solid <?php echo $color ?>">
					
						<span style="float: left;"><!-- 标题 -->
						<a class="title_a" href="/topic.php?tid=<?php echo $topic['topic_tid']?>"><span style="font-size:16px;font-weight:bold;"><?php echo $topic['topic_title']; ?></span></a>&nbsp;
						<?php echo ($topic['topic_top_order']>0?'<font color="#ff0000"><strong>[置顶]</strong>&nbsp;</font>':'');
							  echo ($topic['topic_is_best']==1?'&nbsp;<font color="#ff0000"><strong>[精华]</strong></font>':'');
							  echo ($topic['topic_is_recommend']==1?'&nbsp;<font color="#ff0000"><strong>[推荐]</strong></font>':'');
						 ?>
						</span><!-- 标题 end -->
						
						<span style="float: right;">
							<?php echo $topic['topic_reply_count'] ?>/<?php echo $topic['topic_see_count'] ?>
							<strong><a href="mailto:<?php echo ($topic_mail=strtr($topic['topic_email'],"@","#"))?>"><?php echo $topic_mail;echo $topic['club_user_name']?'('.$topic['club_user_name'].')':''?></a></strong>
						<?php echo date('Y-m-d',$topic['topic_birthday']) ?></span>
						
					</td>

				</tr>
				<?php if ($topic['topic_top_order']==0 && $_COOKIE['s']!='s'): ?>
					<tr bgcolor="#ffffff">
					<td style="padding:8px 18px 8px 18px;"><!-- 文章内容 -->
						<div class="list_inner_text">
							<?php if (trim($topic['topic_is_club'])==1) :?>
								<img onmouseover="resize_max_topic_img(this)" onmouseout="resize_min_topic_img(this);" onerror="this.src='/storage/img/no_img.jpg'" class="list_inner_img" src="<?php echo htmlspecialchars(tools_pick_Value__($topic['topic_theme_pic'],$topic['club_user_theme_pic'])) ?>" /><br /><br />
								
							<?php endif;?>
							
							<?php echo htmlspecialchars(mb_substr($topic['topic_body'],0,300,PAGE_CHAR_SET)); ?>&nbsp;…………&nbsp;&nbsp;&nbsp;<?php echo ($topic['tag_text']?'<br /><span style="color:#888888;">tag:'.$topic['tag_text'].'</span>':'') ?>
							
						</div>
					</td>
					</tr>
					<tr><td><center><hr width="30%" size="1" /><br /></center></td></tr>
				<?php endif; ?>
			<?php endforeach; ?>
<?php /****************** 打印文章 结束********************/ ?>						
			<tr><td><strong><center style="font-size:15px;"><?php echo $__ITEMS['navigat_html'] ?></center></strong><br /><hr size="1" /><br /></td></tr>
			<tr bgcolor="#bbbbbb">
				<td style="padding:8px;border-left:5px solid #444444"><strong style="font-size:14px;"><a href="#sub" onclick="show_submit_div();">『我要发表技术文章』</a></strong></td>
			</tr>
			<tr bgcolor="#ffffff">
				
				<td style="padding:8px 18px 8px 18px;">
			
					<div id="submit_div" style="display:block<?php //echo $__ERRORS?'block':'none' ?>;">
						<form method="POST" action="/index.php?do=new_topic">
							<table>
								<?php if (!empty($__ITEMS['user'])):  ?>
								<tr><td align="right">E-mail&nbsp;：</td><td><?php echo $__ITEMS['user']['club_user_email'],' (',$__ITEMS['user']['club_user_name'],')' ?></td></tr>
								<tr><td align="right">密&nbsp;&nbsp;&nbsp;&nbsp;码：</td><td>用户登录密码</td></tr>
								<tr><td align="right">确认密码：</td><td>略过</td></tr>
								<?php else:?>
								<tr><td align="right">E-mail&nbsp;：</td><td><input type="text" name="email" id="email" size="35" class="txt_input" value="<?php echo $__ITEMS['email'] ?>"  />&nbsp;很重要,日后找回文章密码需要他<?php html_showMessages_($__ERRORS['email'],'#f00','<br />'); ?></td></tr>
								<tr><td align="right">密&nbsp;&nbsp;&nbsp;&nbsp;码：</td><td><input type="password" name="pwd" id="pwd" size="35" class="txt_input"   />&nbsp;很重要,用来管理你发表的文章(每篇文章都拥有独立的密码)<?php html_showMessages_($__ERRORS['pwd'],'#f00','<br />'); ?></td></tr>
								<tr><td align="right">确认密码：</td><td><input type="password" name="pwd2" id="pwd2" size="35" class="txt_input"  />&nbsp;重复一次上面的密码<?php html_showMessages_($__ERRORS['pwd2'],'#f00','<br />'); ?></td></tr>
								<?php endif;?>
								<tr><td align="right">文章标题：</td><td><input type="text" name="title" id="title" class="txt_input" style="width:550px;" value="<?php echo $__ITEMS['title'] ?>"   /><?php html_showMessages_($__ERRORS['title'],'#f00','<br />'); ?></td></tr>
								<tr><td align="right">文章内容：</td><td><textarea name="body" id="body" rows="10" class="txt_input" style="width:550px;" ><?php echo $__ITEMS['body'] ?></textarea><?php html_showMessages_($__ERRORS['body'],'#f00','<br />'); ?></td></tr>
								<?php if (!empty($__ITEMS['user'])): ?>
								<tr><td align="right">相关图片：</td><td><input type="text" name="image" id="image" class="txt_input" style="width:550px;" onfocus="this.value='';" value="<?php echo $__ITEMS['image']?$__ITEMS['image']:"http://" ?>"   /><?php html_showMessages_($__ERRORS['image'],'#f00','<br />'); ?></td></tr>
								<tr><td align="right">标签：</td><td><input type="text" name="tag[]" id="tag1" class="txt_input" style="width:100px;" value="<?php echo $__ITEMS['tag'][1] ?>"   />
																	<input type="text" name="tag[]" id="tag2" class="txt_input" style="width:100px;" value="<?php echo $__ITEMS['tag'][2] ?>"   />
																	<input type="text" name="tag[]" id="tag3" class="txt_input" style="width:100px;" value="<?php echo $__ITEMS['tag'][3] ?>"   />
																	<input type="text" name="tag[]" id="tag4" class="txt_input" style="width:100px;" value="<?php echo $__ITEMS['tag'][4] ?>"   />
																	<input type="text" name="tag[]" id="tag5" class="txt_input" style="width:100px;" value="<?php echo $__ITEMS['tag'][5] ?>"   />
								</td></tr>
								<?php endif;?>
								<tr><td>&nbsp;</td><td>&nbsp;</td></tr>
								<tr><td>&nbsp;</td><td><input class="txt_input" type="submit" value="提交" />&nbsp;&nbsp;<input class="txt_input" type="reset" value="重置" /></td></tr>
							</table>
							<a name="sub" />
						</form>
					</div>
					
				</td>
			
			</tr>
			<tr><td><center><hr width="30%" size="1" /><br /></center></td></tr>
			</table>
		</td>
		<td  valign="top"><!-- 右边 -->
			<table cellpadding="0" cellspacing="2" border="0" width="100%">
			
				<tr bgcolor="#dddddd">
					<td style="padding:8px;"><form method="GET" action="/search.php"><input onfocus="this.value='';" name="w" class="txt_input" style="width:150px;" type="text" value="请输入:日期、标题或Email" />&nbsp;<input class="txt_input" style="width:50px;height:22px;" type="submit" value="搜索" ></form></td>
				</tr>
				
				<tr bgcolor="#dddddd">
					<td style="padding:8px;" align="left"><strong style="font-size:16px;">标签</strong></td>
				</tr>
				<tr>
					<td style="padding:8px;" align="left" class="tag"><?php foreach ($__ITEMS['tag_all'] as $value)
																{echo '<a href="/search.php?t=tag&w=',$value['topic_tag_words'],'">',$value['topic_tag_words'],'</a>','<sup>',$value['count'],'</sup>','&nbsp;&nbsp;';}
															?></td>
				</tr>
				
				<tr bgcolor="#dddddd">
					<td style="padding:8px;" align="right"><a href="/club.php"><strong style="font-size:16px;">进入俱乐部(20会员)&gt;&gt;&gt;</strong></a></td>
				</tr>
				
				<tr>
					<td style="padding:8px;" align="left"><hr size="1" /></td>
				</tr>
				
				<tr bgcolor="#dddddd">
					<td style="padding:8px;" align="right"><strong style="font-size:16px;">友情链接</strong></td>
				</tr>
				<tr>
					<td style="padding:8px;" align="left"><?php foreach ($__ITEMS['friend_link_list'] as $key => $value){//打印友情连接
												echo '&nbsp;<a href="'.$value['friend_link_url'].'">'.$value['friend_link_txt'].'</a>&nbsp;';
											} ?></td>
				</tr>
				<?php include('ad.tpl.php') ?>
			</table>
		</td>
		
		</tr>
	</table>

</div>

</div>
<?php include('foot.php') ?>
</body>
</html>
